<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>修改数据</title>
</head>
<body>
<div id="app">
  <h3>还书</h3>
  <form action="" method="post">
    状态：
    <input type="radio" name="status" v-model="logs.status" value="0">归还
    <input type="radio" id="1" name="status" v-model="logs.status" value="1">借书<br>
    <input type="button" id="btn" @click="submitForm" value="提交">
  </form>
</div>
<script src="../js/axios-0.18.0.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>


<script>

  new Vue({
    el:"#app",
    data(){
      return{
        logs:{}
      }
    },
    methods:{

      getById(){
        var _this = this;
        axios({
          method:"get",
          url:"http://localhost:8080/bookLibary_war/selectByIdServlet"
        }).then(resp=>{
          _this.logs = resp.data;
        })
      },

      submitForm(){
        //2.发送ajax请求
       /* var _this=this;
        axios({
          method:"post",
          url:"http://localhost:8080/bookLibary_war/selectByIdServlet",
          data:_this.brand
        }).then(function (resp) {
          //处理响应，判断响应数据是否为success
          if (resp.data=="success"){
            location.href="http://localhost:8080/brand-demo/brand.html";
          }
        })*/
      }
    }
  })
</script>